Recent video compression standards allow motion vectors to point to macroblocks that are partially or completely outside picture boundaries for the purpose of motion compensation. Allowing reference macroblocks outside the picture boundaries is useful for tracking the motions of objects at the boundaries, for example moving in or out of the picture. If parts of the reference macroblocks are outside the picture, the pixels do not physically exist. Current motion compensation standards define how the non-existing pixels are to be handled, for example by replicating or mirroring one or more edge reference pixels. For motion estimation, the specific problem is how to generate and search samples (i.e., luminance components of the pixels) that are partially or completely outside picture boundaries.
An existing solution to the missing pixel problem is to ignore outside samples and not search locations that are partially or completely outside the picture boundaries. However, ignoring locations partially or completely outside the picture boundaries can result in decreased compression efficiency. Another existing solution is to generate “pad” samples outside of the motion estimation processor as a separate processing step to form a frame around the picture. The resulting “framed” picture is then stored back into an external memory. The framed picture is subsequently loaded from the external memory to the motion estimation processor for processing. Generating the framed picture, though, increases the external processing, the external memory cycles consumed and the amount of external memory occupied. A third existing solution is to generate the outside samples (pad samples) within the motion estimation processor as a separate processing step and store the resulting “framed” search window back in an internal memory. The framed search region is then accessed from the internal memory of the motion estimation processor. However, generating the frame internally increases the internal processing and increases a size of the internal memory to store the framed picture.